package com.hera.process.config.service.impl;

import java.util.List;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.hera.base.util.FiltroDTO;
import com.hera.process.config.dao.FieldOptionDao;
import com.hera.process.config.service.FieldOptionService;
import com.hera.process.form.domain.FieldOption;

@Service("fieldoptionservice")
public class FieldOptionServiceImpl implements FieldOptionService{

	static final Logger logger = Logger.getLogger(UserServiceImpl.class);
	@Autowired
	private FieldOptionDao fieldoptiondao;
	
	@Override
	public FieldOption findById(Long id) {
		
		return fieldoptiondao.findOne(id);
	}

	@Override
	public void update(FieldOption entity) {
		
		fieldoptiondao.save(entity);
	}

	@Override
	public void save(FieldOption entity) {
		
		fieldoptiondao.save(entity);
	}

	@Override
	public void delete(FieldOption entity) {
		
		fieldoptiondao.delete(entity);
	}

	@Override
	public List<FieldOption> findAll() {
		
		return fieldoptiondao.findAll();
	}

	@Override
	public List<FieldOption> findAll(FiltroDTO filtroDTO) {
		
		return fieldoptiondao.obtenerEntidadesPorFiltros(filtroDTO);
	}

}
